package Nisha.JDBC.JDBCdemo;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.mysql.jdbc.Statement;

public class jdbcApplication {

	public void getAllEmployees() throws SQLException
	{
		jdbcGetConnection con = new jdbcGetConnection();
		Connection connection =con.getMySQLConnection();
		Statement stmt= (Statement) connection.createStatement();
		ResultSet rs =stmt.executeQuery("select id, user_name from employee");
		while(rs.next())
		{
			System.out.println(rs.getInt(0)+" "+rs.getString(1));
		}
	}
}
